﻿<local:DocumentBase x:Class="WPFExcelReport.JLTVK03HL"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    xmlns:db="clr-namespace:INTEX.DataBase"
                    xmlns:dat="clr-namespace:System.Windows.Data;assembly=PresentationFramework"
                    xmlns:wep="clr-namespace:WPFExcelReport" 
                    Loaded="Window_Loaded" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
                    FontSize="14" 
                    Background="White"  
                    >
    <local:DocumentBase.Resources>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:MaskPrice  x:Key="dprice"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:Divideby10000  x:Key="d10000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:String2ColorConverter  x:Key="str2color"/>
        <db:SETINTEXDB  x:Key="SetData" />
        <db:SETINTEXDB  x:Key="SetQP" />
        <CollectionViewSource   x:Key="vwVKPOS" Source="{Binding Path=ICC_VKPOSHL,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwVKKOPF" Source="{Binding Path=VKKOPF,Source={StaticResource SetData}}" />
    </local:DocumentBase.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="Auto" MinHeight="20"></RowDefinition>
            <RowDefinition Height="*" MinHeight="300"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"></ColumnDefinition>
            <ColumnDefinition Width="1*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <Expander  Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
            Name="expLog" ExpandDirection="Down" IsExpanded="True">
            <StackPanel>
                <WrapPanel Name="zoneCommand" Margin="4,0,51,6" Grid.ColumnSpan="3">
                    <Label Content="系统" Width="Auto" Margin="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                    <TextBox Name="txtMANDANT" MaxLength="2" Width="40" Margin="10,0,0,0" Text="00" HorizontalAlignment="Left" Background="Pink"  TabIndex="1" />
                    <Label Content="语言" Width="Auto" Margin="0,0,0,0" HorizontalAlignment="Left"  VerticalAlignment="Center" />
                    <TextBox IsReadOnly="True" Name="txtSPRACHKZ" Width="40" Margin="0,0,0,0" Text="" MaxLength="1" HorizontalAlignment="Left" Background="Pink" FontSize="18" TabIndex="2" />
                    <Label Content="用户名" Width="Auto" Margin="10,0,0,0" HorizontalAlignment="Left"  VerticalAlignment="Center" />
                    <TextBox Name="txtUserID" Width="80" Margin="10,0,0,0" Text="" HorizontalAlignment="Left" Background="Yellow" FontSize="18" MaxLength="8" AcceptsTab="False" CharacterCasing="Upper" KeyboardNavigation.TabIndex="0" TabIndex="3" />
                    <Label Content="密码" Width="Auto" Margin="10,0,0,0" HorizontalAlignment="Left"  VerticalAlignment="Center" />
                    <PasswordBox Name="txtPassword" Width="80" Margin="10,0,0,0" HorizontalAlignment="Left" Background="Yellow"  KeyboardNavigation.TabIndex="1" TabIndex="4" />
                    <Button Height="Auto" Margin="10,0,0,0" Name="btnLogIn" Width="Auto" Click="btnLogIn_Click" KeyboardNavigation.TabIndex="2" IsDefault="True" TabIndex="5">
                        登录
                    </Button>
                    <TextBlock Name="Administration"></TextBlock>
                    <CheckBox FontSize="14" Content="属于评审组" Name="IsBelongs2V9"
                              Visibility="Hidden"></CheckBox>
                    <TextBlock FontSize="14" MinWidth="200" Width="Auto" Name="MemberV9" Background="#FF00AF00"
                               Visibility="Hidden"></TextBlock>
                    <TextBlock Name="txtLogIn" Width="Auto" Margin="10,0,0,0" HorizontalAlignment="Left" Background="White" FontSize="14" KeyboardNavigation.TabIndex="1" />
                </WrapPanel> 
            </StackPanel>
        </Expander>
        <WrapPanel Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2">
            <WrapPanel Name="ZoneOrder">
                <TextBlock Width="Auto">订单号:</TextBlock>
                <TextBox   Name="txtVKPAUFKRS" MaxLength="2" Width="40" Margin="10,0,0,0"  HorizontalAlignment="Left" Background="Pink"  CharacterCasing="Upper" TabIndex="11" />
                <TextBox   Name="txtVKPAUFLFD" MaxLength="6" Width="80" Margin="0,0,0,0"  HorizontalAlignment="Left" TabIndex="12" />
                <TextBox   Name="txtVKPNEUDAT" MaxLength="6" Width="80" Margin="0,0,0,0"  HorizontalAlignment="Left" TabIndex="12" />
                <Button  Height="30"  Width="30" Margin="10,0,0,0" Name="btnGetVKPOS" Click="btnGetVKPOS_Click" KeyboardNavigation.TabIndex="3" IsDefault="True" TabIndex="13">
                    <Button.Background>
                        <ImageBrush ImageSource="Images/Search.png" />
                    </Button.Background>
                </Button>
            </WrapPanel>
            <WrapPanel Name="ZoneAccount">
                <Button Content="EXCEL" Margin="20,0,0,0" Name="btnReport" Width="47" Click="btnReport_Click" TabIndex="14" />
                <Button   Content="预览" Margin="20,0,0,0" Name="btnPrintPreview" Width="51" Click="btnPrintPreview_Click" TabIndex="15" />
                <CheckBox Content="送审" FontSize="18" Name="IsSendForAuditing" IsChecked="True" />
            </WrapPanel>
            <WrapPanel Name="ZoneAuditing">
                <CheckBox Content="审单"
                      FontSize="18"
                      Name="IsOnAuditing" />
                <Button   Content="预览"
                          Margin="20,0,0,0"
                          Name="btnAuditing"
                          Width="51"
                          Click="btnPrintPreview_Click"
                          TabIndex="15" />
                <Button Content="发布" Name="btnDistribute" Width="51" Margin="20,0,0,0" Click="btnDistribute_Click" TabIndex="16" />
            </WrapPanel>
        </WrapPanel>     
        <FlowDocumentScrollViewer Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2"  >
                <FlowDocument>
                    <Paragraph>
                        <WrapPanel>
                            <Grid HorizontalAlignment="Left" VerticalAlignment="Top">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <Label Content="客户号:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                <TextBlock Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" 
                                                                 Text="{Binding Path=VKKKUNDNR, Source={StaticResource ResourceKey=vwVKKOPF}}" VerticalAlignment="Center" Width="120" />
                            </Grid>
                            <Grid HorizontalAlignment="Left" VerticalAlignment="Top">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <Label Content="发货条件:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                <TextBlock Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Text="{Binding Path=VKKLIEFBED, Source={StaticResource ResourceKey=vwVKKOPF}}" VerticalAlignment="Center" Width="60" />
                            </Grid>
                            <Grid HorizontalAlignment="Left" VerticalAlignment="Top">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <Label Content="运输方式:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Text="{Binding Path=VKKVERSART, Source={StaticResource ResourceKey=vwVKKOPF}}" VerticalAlignment="Center" Width="60" />
                            </Grid>
                            <Grid HorizontalAlignment="Left" VerticalAlignment="Top">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <Label Content="销售合同:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                <TextBox Grid.Column="1" Grid.Row="0" Height="22" HorizontalAlignment="Left" Margin="2,4,0,8" Text="{Binding Path=VKKBESTNR, Source={StaticResource ResourceKey=vwVKKOPF}}" VerticalAlignment="Center" Width="120" />
                            </Grid>
                        </WrapPanel>
                    </Paragraph> 
                    <Paragraph>
                        <DataGrid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3"
                              AutoGenerateColumns="False"
                              EnableRowVirtualization="True"  
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwVKPOS}}"  
                              HeadersVisibility="Column"
                              x:Name="dgVKPOS"    
                              Height="Auto"
                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                              ScrollViewer.VerticalScrollBarVisibility="Auto" 
                              >
                            <DataGrid.Columns> 
                            <DataGridTextColumn Binding="{Binding Path=VKPNEUDAT}" Header="登记日期"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=KDKUNDNA, Converter={StaticResource ResourceKey=gb2312}}" Header="公司名称"  Width="Auto" MinWidth="20"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPKOLL}" Header="品名"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VAAPRGR, Converter={StaticResource ResourceKey=gb2312}}" Header="季节"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPNUM, Converter={StaticResource ResourceKey=gb2312}}" Header="H/L号"   Width="Auto"  MinWidth="100"/>
                            <DataGridTextColumn Binding="{Binding Path=VAABEZ, Converter={StaticResource ResourceKey=gb2312}}" Header="规格" Width="Auto" MinWidth="100"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPMENGE1}" Header="只数"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPWUTERM}" Header="要求时间" Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPWUTERM}" Header="坯布完成"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPWUTERM}" Header="整理完成"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPNEUBEN}" Header="设计师"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPNEUBEN}" Header="业务员"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPNEUBEN}" Header="备注"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPWUTERM}" Header="大货情况"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPLIEFTERM}" Header="寄样时间"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPPOSTYP}" Header="P或F"  Width="Auto" MinWidth="40"/>
                        </DataGrid.Columns>
                        </DataGrid>
                    </Paragraph>
                </FlowDocument>
            </FlowDocumentScrollViewer>     
    </Grid>
</local:DocumentBase>